package Data;

import java.util.Date;
import java.util.Random;

public class demo2 {
    public static void main(String[] args) {
        /*Date d1 = new Date(0);
        long time = d1.getTime();
        time += 1000L * 60 * 60 * 24 * 365;
        d1.setTime(time);
        System.out.println(d1);*/


        Random r= new Random();
        Date d2 = new Date(Math.abs(r.nextInt()));
        Date d3 = new Date(Math.abs(r.nextInt()));
        long time2 = d2.getTime();
        long time3 = d3.getTime();
        while (true){
            if (time2 == time3){
                System.out.println(d2);
                System.out.println(d3);
                break;
            }
        }
        /*if(time2 > time3){
            System.out.println("第一个时间在后面，第二个时间在前面");
        } else if (time2 < time3) {
            System.out.println("第二个时间在后面，第一个时间在前面");
        }else {
            System.out.println("两个时间一致");
        }*/
    }
}
